package com.zw.cloud.common.entity;

import com.alibaba.fastjson2.JSON;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@NoArgsConstructor
@Data
public class CompareEntity {

    @JsonProperty("id")
    private Long id;
    @JsonProperty("customerNo")
    private String customerNo;
    @JsonProperty("customerName")
    private String customerName;
    @JsonProperty("fabricName")
    private String fabricName;
    @JsonProperty("fabricNo")
    private String fabricNo;
    @JsonProperty("colorNo")
    private String colorNo;
    @JsonProperty("colorName")
    private String colorName;
    @JsonProperty("batchNo")
    private String batchNo;
    @JsonProperty("topFeed")
    private BigDecimal topFeed;
    @JsonProperty("lowerFeed")
    private BigDecimal lowerFeed;
    @JsonProperty("brushFeed")
    private BigDecimal brushFeed;
    @JsonProperty("speed")
    private BigDecimal speed;
    @JsonProperty("speciCycleWindSpeed")
    private SpeciCycleWindSpeedDTO speciCycleWindSpeed;
    @JsonProperty("dryingRoomPresetTemp")
    private DryingRoomPresetTempDTO dryingRoomPresetTemp;
    @JsonProperty("assistant")
    private List<AssistantDTO> assistant;
    @JsonProperty("orgCode")
    private String orgCode;
    @JsonProperty("totalAmplitude")
    private String totalAmplitude;
    @JsonProperty("remark")
    private String remark;
    @JsonProperty("createUser")
    private String createUser;
    @JsonProperty("createTime")
    private String createTime;
    @JsonProperty("createSystem")
    private String createSystem;
    @JsonProperty("updateUser")
    private String updateUser;
    @JsonProperty("updateTime")
    private String updateTime;
    @JsonProperty("updateSystem")
    private String updateSystem;
    @JsonProperty("isDeleted")
    private Integer isDeleted;
    @JsonProperty("createUserName")
    private String createUserName;
    @JsonProperty("ptQuantity")
    private BigDecimal ptQuantity;
    @JsonProperty("craftType")
    private String craftType;
    @JsonProperty("craftTypeName")
    private String craftTypeName;
    @JsonProperty("specification")
    private String specification;
    @JsonProperty("style")
    private String style;
    @JsonProperty("fanSpeed")
    private BigDecimal fanSpeed;
    @JsonProperty("dryingRoomTemp")
    private BigDecimal dryingRoomTemp;
    @JsonProperty("exhaustSpeed")
    private BigDecimal exhaustSpeed;
    @JsonProperty("rollingPressure")
    private BigDecimal rollingPressure;
    @JsonProperty("torsion")
    private BigDecimal torsion;
    @JsonProperty("schedulePreWeight")
    private String schedulePreWeight;
    @JsonProperty("scheduleGramHeft")
    private String scheduleGramHeft;
    @JsonProperty("upperScheduleWeftDensity")
    private String upperScheduleWeftDensity;
    @JsonProperty("scheduleWeftDensity")
    private String scheduleWeftDensity;
    @JsonProperty("scheduleElasticity")
    private String scheduleElasticity;
    @JsonProperty("deviceName")
    private String deviceName;
    @JsonProperty("deviceIds")
    private List<DeviceIdsDTO> deviceIds;
    @JsonProperty("dynamicField")
    private DynamicFieldDTO dynamicField;
    @JsonProperty("craftMold")
    private String craftMold;
    @JsonProperty("stereotypeRequirement")
    private String stereotypeRequirement;
    @JsonProperty("craftSource")
    private Integer craftSource;
    @JsonProperty("doorWidthActual")
    private DoorWidthActualDTO doorWidthActual;
    @JsonProperty("productWeight")
    private String productWeight;
    @JsonProperty("shrinkage")
    private BigDecimal shrinkage;
    @JsonProperty("thickness")
    private String thickness;
    @JsonProperty("colorSystem")
    private String colorSystem;
    @JsonProperty("fabricWidth")
    private String fabricWidth;
    @JsonProperty("reductionWeight")
    private String reductionWeight;
    @JsonProperty("reductionAmplitude")
    private String reductionAmplitude;
    @JsonProperty("preCraft")
    private Boolean preCraft;
    @JsonProperty("needTips")
    private Boolean needTips;
    @JsonProperty("productType")
    private Integer productType;
    @JsonProperty("craftVersion")
    private Integer craftVersion;
    @JsonProperty("craftVersionStr")
    private String craftVersionStr;
    @JsonProperty("craftVersionId")
    private String craftVersionId;

    @NoArgsConstructor
    @Data
    public static class SpeciCycleWindSpeedDTO {
        @JsonProperty("speciCycleWindSpeed1")
        private BigDecimal speciCycleWindSpeed1;
        @JsonProperty("speciCycleWindSpeed2")
        private BigDecimal speciCycleWindSpeed2;
        @JsonProperty("speciCycleWindSpeed3")
        private BigDecimal speciCycleWindSpeed3;
        @JsonProperty("speciCycleWindSpeed4")
        private BigDecimal speciCycleWindSpeed4;
        @JsonProperty("speciCycleWindSpeed5")
        private BigDecimal speciCycleWindSpeed5;
        @JsonProperty("speciCycleWindSpeed6")
        private BigDecimal speciCycleWindSpeed6;
        @JsonProperty("speciCycleWindSpeed7")
        private BigDecimal speciCycleWindSpeed7;
        @JsonProperty("speciCycleWindSpeed8")
        private BigDecimal speciCycleWindSpeed8;
        @JsonProperty("speciCycleWindSpeed9")
        private BigDecimal speciCycleWindSpeed9;
        @JsonProperty("speciCycleWindSpeed10")
        private BigDecimal speciCycleWindSpeed10;
    }

    @NoArgsConstructor
    @Data
    public static class DryingRoomPresetTempDTO {
        @JsonProperty("dryingRoomPresetTemp1")
        private BigDecimal dryingRoomPresetTemp1;
        @JsonProperty("dryingRoomPresetTemp2")
        private BigDecimal dryingRoomPresetTemp2;
        @JsonProperty("dryingRoomPresetTemp3")
        private BigDecimal dryingRoomPresetTemp3;
        @JsonProperty("dryingRoomPresetTemp4")
        private BigDecimal dryingRoomPresetTemp4;
        @JsonProperty("dryingRoomPresetTemp5")
        private BigDecimal dryingRoomPresetTemp5;
        @JsonProperty("dryingRoomPresetTemp6")
        private BigDecimal dryingRoomPresetTemp6;
        @JsonProperty("dryingRoomPresetTemp7")
        private BigDecimal dryingRoomPresetTemp7;
        @JsonProperty("dryingRoomPresetTemp8")
        private BigDecimal dryingRoomPresetTemp8;
        @JsonProperty("dryingRoomPresetTemp9")
        private BigDecimal dryingRoomPresetTemp9;
        @JsonProperty("dryingRoomPresetTemp10")
        private BigDecimal dryingRoomPresetTemp10;
    }

    @NoArgsConstructor
    @Data
    public static class DynamicFieldDTO {
        @JsonProperty("lat")
        private String lat;
        @JsonProperty("lon")
        private String lon;
        @JsonProperty("feel")
        private String feel;
        @JsonProperty("faceUp")
        private BigDecimal faceUp;
        @JsonProperty("topUnroll")
        private String topUnroll;
        @JsonProperty("grooveTemp")
        private BigDecimal grooveTemp;
        @JsonProperty("liquidRate")
        private String liquidRate;
        @JsonProperty("rightChain")
        private String rightChain;
        @JsonProperty("foldingFrame")
        private String foldingFrame;
        @JsonProperty("inputTension")
        private String inputTension;
        @JsonProperty("topFeedSpeed")
        private String topFeedSpeed;
        @JsonProperty("convectionFan")
        private BigDecimal convectionFan;
        @JsonProperty("hairDirection")
        private BigDecimal hairDirection;
        @JsonProperty("middleSupport")
        private String middleSupport;
        @JsonProperty("outletTension")
        private String outletTension;
        @JsonProperty("craftShrinkage")
        private String craftShrinkage;
        @JsonProperty("lowerFeedSpeed")
        private String lowerFeedSpeed;
        @JsonProperty("rollingTension")
        private String rollingTension;
        @JsonProperty("upperDoorWidth")
        private String upperDoorWidth;
        @JsonProperty("centeringDevice")
        private String centeringDevice;
        @JsonProperty("landingDoorWidth")
        private String landingDoorWidth;
        @JsonProperty("lowerWarpDensity")
        private String lowerWarpDensity;
        @JsonProperty("chainDistribution")
        private String chainDistribution;
        @JsonProperty("directContraction")
        private String directContraction;
        @JsonProperty("clothPressingWheel")
        private String clothPressingWheel;
        @JsonProperty("lowerClothRollRate")
        private String lowerClothRollRate;
        @JsonProperty("upperClothRollRate")
        private String upperClothRollRate;
        @JsonProperty("dryingRoomTempSetting")
        private String dryingRoomTempSetting;
        @JsonProperty("transverseContraction")
        private String transverseContraction;
    }

    @NoArgsConstructor
    @Data
    public static class DoorWidthActualDTO {
        @JsonProperty("doorWidthActual1")
        private BigDecimal doorWidthActual1;
        @JsonProperty("doorWidthActual2")
        private BigDecimal doorWidthActual2;
        @JsonProperty("doorWidthActual3")
        private BigDecimal doorWidthActual3;
        @JsonProperty("doorWidthActual4")
        private BigDecimal doorWidthActual4;
        @JsonProperty("doorWidthActual5")
        private BigDecimal doorWidthActual5;
        @JsonProperty("doorWidthActual6")
        private BigDecimal doorWidthActual6;
        @JsonProperty("doorWidthActual7")
        private BigDecimal doorWidthActual7;
        @JsonProperty("doorWidthActual8")
        private BigDecimal doorWidthActual8;
        @JsonProperty("doorWidthActual9")
        private BigDecimal doorWidthActual9;
        @JsonProperty("doorWidthActual10")
        private BigDecimal doorWidthActual10;
    }

    @NoArgsConstructor
    @Data
    public static class AssistantDTO {
        @JsonProperty("id")
        private String id;
        @JsonProperty("name")
        private String name;
        @JsonProperty("value")
        private String value;
        @JsonProperty("parentId")
        private String parentId;
        @JsonProperty("parentName")
        private String parentName;
        @JsonProperty("codeName")
        private String codeName;
        @JsonProperty("externalFiled")
        private ExternalFiledDTO externalFiled;

        @NoArgsConstructor
        @Data
        public static class ExternalFiledDTO {
            @JsonProperty("assistantLimit")
            private BigDecimal assistantLimit;
            @JsonProperty("dangerousIdentification")
            private List<DangerousIdentificationDTO> dangerousIdentification;

            @NoArgsConstructor
            @Data
            public static class DangerousIdentificationDTO {
                @JsonProperty("flag")
                private Integer flag;
                @JsonProperty("name")
                private String name;
            }
        }
    }

    @NoArgsConstructor
    @Data
    public static class DeviceIdsDTO {
        @JsonProperty("id")
        private Integer id;
    }

    public static void main(String[] args) {
        CompareEntity compareEntity = buildCompareEntity();

    }

    private static CompareEntity buildCompareEntity() {
        String s = "{\n" +
                "    \"id\":\"1725430391365640194\",\n" +
                "    \"customerNo\":\"N0682\",\n" +
                "    \"customerName\":\"福建东锦\",\n" +
                "    \"fabricName\":\"T400破卡\",\n" +
                "    \"fabricNo\":\"PB100020\",\n" +
                "    \"colorNo\":\"19080012\",\n" +
                "    \"colorName\":\"黑色\",\n" +
                "    \"batchNo\":\"103000058\",\n" +
                "    \"topFeed\":12,\n" +
                "    \"lowerFeed\":11,\n" +
                "    \"brushFeed\":11,\n" +
                "    \"speed\":2,\n" +
                "    \"speciCycleWindSpeed\":{\n" +
                "        \"speciCycleWindSpeed1\":12,\n" +
                "        \"speciCycleWindSpeed2\":12,\n" +
                "        \"speciCycleWindSpeed3\":12,\n" +
                "        \"speciCycleWindSpeed4\":12,\n" +
                "        \"speciCycleWindSpeed5\":12,\n" +
                "        \"speciCycleWindSpeed6\":12,\n" +
                "        \"speciCycleWindSpeed7\":12,\n" +
                "        \"speciCycleWindSpeed8\":12,\n" +
                "        \"speciCycleWindSpeed9\":12,\n" +
                "        \"speciCycleWindSpeed10\":12\n" +
                "    },\n" +
                "    \"dryingRoomPresetTemp\":{\n" +
                "        \"dryingRoomPresetTemp1\":1,\n" +
                "        \"dryingRoomPresetTemp2\":1,\n" +
                "        \"dryingRoomPresetTemp3\":1,\n" +
                "        \"dryingRoomPresetTemp4\":1,\n" +
                "        \"dryingRoomPresetTemp5\":1,\n" +
                "        \"dryingRoomPresetTemp6\":1,\n" +
                "        \"dryingRoomPresetTemp7\":1,\n" +
                "        \"dryingRoomPresetTemp8\":1,\n" +
                "        \"dryingRoomPresetTemp9\":1,\n" +
                "        \"dryingRoomPresetTemp10\":1\n" +
                "    },\n" +
                "    \"assistant\":[\n" +
                "        {\n" +
                "            \"id\":\"817\",\n" +
                "            \"name\":\"我的助剂0012\",\n" +
                "            \"value\":\"11\",\n" +
                "            \"parentId\":\"816\",\n" +
                "            \"parentName\":\"软剂类1\",\n" +
                "            \"codeName\":\"code00|我的助剂0012\",\n" +
                "            \"externalFiled\":{\n" +
                "                \"assistantLimit\":10,\n" +
                "                \"dangerousIdentification\":[\n" +
                "                    {\n" +
                "                        \"flag\":1,\n" +
                "                        \"name\":\"环境危害\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"flag\":2,\n" +
                "                        \"name\":\"刺激性\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"flag\":3,\n" +
                "                        \"name\":\"剧毒\"\n" +
                "                    },\n" +
                "                    {\n" +
                "                        \"flag\":7,\n" +
                "                        \"name\":\"腐蚀性\"\n" +
                "                    }\n" +
                "                ]\n" +
                "            }\n" +
                "        },\n" +
                "        {\n" +
                "            \"id\":\"103\",\n" +
                "            \"name\":\"抗紫外线6160\",\n" +
                "            \"value\":\"2\",\n" +
                "            \"parentId\":\"76\",\n" +
                "            \"parentName\":\"其它\",\n" +
                "            \"codeName\":\"QT-6160|抗紫外线6160\",\n" +
                "            \"externalFiled\":{\n" +
                "                \"assistantLimit\":10\n" +
                "            }\n" +
                "        }\n" +
                "    ],\n" +
                "    \"orgCode\":\"devController\",\n" +
                "    \"totalAmplitude\":\"13\",\n" +
                "    \"remark\":\"问问\",\n" +
                "    \"createUser\":\"E5F887E61DED452E9AD28E84746D49E9\",\n" +
                "    \"createTime\":\"2023-11-17 16:27:17\",\n" +
                "    \"createSystem\":\"B4263529337148489E88A215BE562CF8\",\n" +
                "    \"updateUser\":\"E5F887E61DED452E9AD28E84746D49E9\",\n" +
                "    \"updateTime\":\"2023-11-17 16:27:17\",\n" +
                "    \"updateSystem\":\"B4263529337148489E88A215BE562CF8\",\n" +
                "    \"isDeleted\":0,\n" +
                "    \"createUserName\":\"15937699668\",\n" +
                "    \"ptQuantity\":10,\n" +
                "    \"craftType\":\"811\",\n" +
                "    \"craftTypeName\":\"123456787714\",\n" +
                "    \"specification\":\"11\",\n" +
                "    \"style\":\"\",\n" +
                "    \"fanSpeed\":12,\n" +
                "    \"dryingRoomTemp\":1,\n" +
                "    \"exhaustSpeed\":11,\n" +
                "    \"rollingPressure\":1,\n" +
                "    \"torsion\":1,\n" +
                "    \"schedulePreWeight\":\"11\",\n" +
                "    \"scheduleGramHeft\":\"11\",\n" +
                "    \"upperScheduleWeftDensity\":\"1\",\n" +
                "    \"scheduleWeftDensity\":\"1\",\n" +
                "    \"scheduleElasticity\":\"1\",\n" +
                "    \"deviceName\":\"\",\n" +
                "    \"deviceIds\":[\n" +
                "        {\n" +
                "            \"id\":0\n" +
                "        }\n" +
                "    ],\n" +
                "    \"dynamicField\":{\n" +
                "        \"lat\":\"1\",\n" +
                "        \"lon\":\"1\",\n" +
                "        \"feel\":\"1\",\n" +
                "        \"faceUp\":1,\n" +
                "        \"topUnroll\":\"\",\n" +
                "        \"grooveTemp\":1,\n" +
                "        \"liquidRate\":\"1\",\n" +
                "        \"rightChain\":\"1\",\n" +
                "        \"foldingFrame\":\"1\",\n" +
                "        \"inputTension\":\"1\",\n" +
                "        \"topFeedSpeed\":\"1\",\n" +
                "        \"convectionFan\":1,\n" +
                "        \"hairDirection\":1,\n" +
                "        \"middleSupport\":\"1\",\n" +
                "        \"outletTension\":\"1\",\n" +
                "        \"craftShrinkage\":\"1\",\n" +
                "        \"lowerFeedSpeed\":\"1\",\n" +
                "        \"rollingTension\":\"1\",\n" +
                "        \"upperDoorWidth\":\"12-12\",\n" +
                "        \"centeringDevice\":\"6\",\n" +
                "        \"landingDoorWidth\":\"12-12\",\n" +
                "        \"lowerWarpDensity\":\"1\",\n" +
                "        \"chainDistribution\":\"1\",\n" +
                "        \"directContraction\":\"1\",\n" +
                "        \"clothPressingWheel\":\"1\",\n" +
                "        \"lowerClothRollRate\":\"1\",\n" +
                "        \"upperClothRollRate\":\"12\",\n" +
                "        \"dryingRoomTempSetting\":\"1\",\n" +
                "        \"transverseContraction\":\"1\"\n" +
                "    },\n" +
                "    \"craftMold\":\"1550544307434913793\",\n" +
                "    \"stereotypeRequirement\":\"特种抗菌\",\n" +
                "    \"craftSource\":0,\n" +
                "    \"doorWidthActual\":{\n" +
                "        \"doorWidthActual1\":13,\n" +
                "        \"doorWidthActual2\":13,\n" +
                "        \"doorWidthActual3\":13,\n" +
                "        \"doorWidthActual4\":13,\n" +
                "        \"doorWidthActual5\":13,\n" +
                "        \"doorWidthActual6\":13,\n" +
                "        \"doorWidthActual7\":13,\n" +
                "        \"doorWidthActual8\":13,\n" +
                "        \"doorWidthActual9\":13,\n" +
                "        \"doorWidthActual10\":13\n" +
                "    },\n" +
                "    \"productWeight\":\"\",\n" +
                "    \"shrinkage\":2,\n" +
                "    \"thickness\":\"11\",\n" +
                "    \"colorSystem\":\"11\",\n" +
                "    \"fabricWidth\":\"客到\",\n" +
                "    \"reductionWeight\":\"1\",\n" +
                "    \"reductionAmplitude\":\"11\",\n" +
                "    \"preCraft\":false,\n" +
                "    \"needTips\":false,\n" +
                "    \"productType\":1,\n" +
                "    \"craftVersion\":2,\n" +
                "    \"craftVersionStr\":\"v2\",\n" +
                "    \"craftVersionId\":\"1725425380011220993\"\n" +
                "}";
        return JSON.parseObject(s,CompareEntity.class);
    }
}
